import type { LoginParams, LoginData, Profile } from "@/types/user"
import { request } from "@/utils/reuqest"

// 登录接口封装
export const loginAPI=(data:LoginParams)=>{
  // 返回 Promise
  return request<LoginData>('/park/login','POST',data)
}

/**
 * 获取用户信息
 * @returns 
 */
export const getProfileAPI = () => {
  return request<Profile>('/park/user/profile')
}